import request from '@/utils/request'
// 获取题库列表
export const questionList = (params) => {
  return request({
    url: '/question/list',
    method: 'get',
    params
  })
}

// 获取学科列表
export const subjectList = (params) => {
  return request({
    url: '/subject/list',
    method: 'get',
    params
  })
}

// 获取企业列表
export const enterpriseList = (params) => {
  return request({
    url: '/enterprise/list',
    method: 'get',
    params
  })
}

// 发布题目
export const questionAdd = (data) => {
  return request({
    url: '/question/add',
    method: 'post',
    data
  })
}
// 编辑题目
export const questionEdit = (data) => {
  return request({
    url: '/question/edit',
    method: 'post',
    data
  })
}
// 删除题目
export const questionRemove = (data) => {
  return request({
    url: '/question/remove/' + data.id,
    method: 'post',
    data
  })
}

// 更改状态
export const questionStatus = (data) => {
  return request({
    url: '/question/status/' + data.id,
    method: 'post',
    data
  })
}
